﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;


namespace CapturarObjetos.Nucleo
{

    class Power_Bar
    {
        public static Texture2D sprite;
        public static int power;
        public static Boolean visible;
        public static Vector2 pos;

       

        public static void Update(GameTime gameTime)
        {
            if (visible)
            {
                if (gameTime.TotalGameTime.Milliseconds % 500 == 0)
                {
                    if (power < 7)
                    {
                        power++;
                    }
                    else
                    {
                        visible = false;
                        power = 0;
                    }
                    
                }
            }
            
        }

        public static void Draw(SpriteBatch spriteBatch)
        {
            if (visible)
            {
                spriteBatch.Draw(sprite, new Rectangle((int)pos.X, (int)pos.Y, sprite.Width, sprite.Height), Color.White);
            }
      
        }

    }
}
